<html>
<head>
<title>ListaZakupow.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
.ln { color: rgb(0,0,0); font-weight: normal; font-style: normal; }
.s0 { color: rgb(0,0,128); font-weight: bold; }
.s1 { }
.s2 { color: rgb(128,128,128); font-style: italic; }
.s3 { color: rgb(0,128,0); font-weight: bold; }
</style>
</head>
<BODY BGCOLOR="#ffffff">
<TABLE CELLSPACING=0 CELLPADDING=5 COLS=1 WIDTH="100%" BGCOLOR="#C0C0C0" >
<TR><TD><CENTER>
<FONT FACE="Arial, Helvetica" COLOR="#000000">
ListaZakupow.java</FONT>
</center></TD></TR></TABLE>
<pre>

<span class="s0">package </span><span class="s1">com.example.lista_zakupow.zakupy; 
 
</span><span class="s0">import </span><span class="s1">com.example.lista_zakupow.adapters.GetterName; 
 
</span><span class="s0">import </span><span class="s1">java.io.Serializable; 
 
</span><span class="s2">/** 
 * Lista zakupow ktora ma nazwe oraz id 
 */</span><span class="s1"> 
</span><span class="s0">public class </span><span class="s1">ListaZakupow </span><span class="s0">implements </span><span class="s1">GetterName, Serializable{ 
    </span><span class="s0">private </span><span class="s1">String name; 
    </span><span class="s0">private long </span><span class="s1">id; 
 
    </span><span class="s0">public </span><span class="s1">ListaZakupow(String name) { 
        </span><span class="s0">this</span><span class="s1">.name = name; 
    } 
 
    </span><span class="s0">public </span><span class="s1">ListaZakupow(</span><span class="s0">long </span><span class="s1">id, String name) { 
        </span><span class="s0">this</span><span class="s1">.name = name; 
        </span><span class="s0">this</span><span class="s1">.id = id; 
    } 
 
    </span><span class="s0">public </span><span class="s1">String getName() { 
        </span><span class="s0">return </span><span class="s1">name; 
    } 
 
    </span><span class="s0">public void </span><span class="s1">setId(</span><span class="s0">long </span><span class="s1">id) { 
        </span><span class="s0">this</span><span class="s1">.id = id; 
    } 
 
    </span><span class="s0">public long </span><span class="s1">getId() { 
        </span><span class="s0">return </span><span class="s1">id; 
    } 
 
    @Override 
    </span><span class="s0">public </span><span class="s1">String getNameToView() { 
        </span><span class="s0">return this</span><span class="s1">.name; 
    } 
 
    </span><span class="s0">public void </span><span class="s1">setName(String name) { 
        </span><span class="s0">this</span><span class="s1">.name = name; 
    } 
 
    @Override 
    </span><span class="s0">public </span><span class="s1">String toString() { 
        </span><span class="s0">return </span><span class="s3">&quot;ListaZakupow{&quot; </span><span class="s1">+ 
                </span><span class="s3">&quot;name='&quot; </span><span class="s1">+ name + </span><span class="s3">'</span><span class="s0">\'</span><span class="s3">' </span><span class="s1">+ 
                </span><span class="s3">&quot;, id=&quot; </span><span class="s1">+ id + 
                </span><span class="s3">&quot;} &quot; </span><span class="s1">+ </span><span class="s0">super</span><span class="s1">.toString(); 
    } 
} 
</span></pre>
</body>
</html>